﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;

using CloudSoft.Workflows;

namespace ERPStore.Exporter.Workflows.Activities
{

	public sealed class ApplyOffers : CodeActivity
	{
		public InArgument<ERPStore.Models.Product> Product { get; set; }

		protected override void Execute(CodeActivityContext context)
		{
			var product = context.GetValue(this.Product);
			var offerService = context.GetService<ERPStore.Services.IOffersService>();

			offerService.ApplyOffers(product, null);
		}
	}
}
